package org.footballmanager.pandafootball.system.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.footballmanager.pandafootball.system.domain.FootClub;
import org.footballmanager.pandafootball.system.form.impl.FootClubSearchForm;
import tk.mybatis.mapper.common.BaseMapper;

import java.io.Serializable;
import java.util.List;

@Mapper
public interface FootClubMapper extends BaseMapper<FootClub> {
    /**
     * 翻页方法
     *
     * @param footClubSearchForm 条件
     * @return 列表
     */
    List<FootClub> findall(FootClubSearchForm footClubSearchForm);

    /**
     * 根据主键获取记录
     *
     * @param id 主键
     * @return 记录
     */
    FootClub findById(Serializable id);

    /**
     * 通过用户主键和赛季主键查找记录
     *
     * @param userId 用户主键
     * @param sjId   赛季主键
     * @return 记录
     */
    FootClub findByUserIdAndSjId(@Param("userId") Long userId, @Param("sjId") Long sjId);
}